function X = full2sub(Y, P, T)


[D q] = size(P);
N = numel(Y)/D;

% Y = reshape(Y, D, N);
X = P'*(Y-T*ones(1, N));
